{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% set render_as_html = field.customOptions.get('renderAsHtml') %}
{% if ea().crud.currentAction == 'detail' %}
    <span title="{{ field.value }}">
        {{ render_as_html ? field.formattedValue|raw : field.formattedValue|nl2br }}
    </span>
{% else %}
    <span title="{{ field.value }}">
        {{ render_as_html ? field.formattedValue|raw : field.formattedValue|striptags }}
    </span>
{% endif %}
